package com.lucy.wx.config;

import com.lucy.starter.loader.AuthService;
import com.lucy.starter.loader.DefaultAuthServiceImpl;
import com.lucy.wx.miniapp.config.DefaultWxMiniAppConfig;
import com.lucy.wx.miniapp.config.WxMiniAppConfig;
import com.lucy.wx.miniapp.core.DefaultMiniAppApiImpl;
import com.lucy.wx.miniapp.core.MiniAppApi;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;

/**
 * @author kindear
 * 微信服务配置信息
 */
@SpringBootConfiguration
public class WxServiceConfig {
    @Bean
    @ConditionalOnMissingBean(value = WxMiniAppConfig.class)
    public WxMiniAppConfig wxMiniAppConfig() {
        return new DefaultWxMiniAppConfig();
    }

    @Bean
    @ConditionalOnMissingBean(value = MiniAppApi.class)
    public MiniAppApi miniAppApi(){
        return new DefaultMiniAppApiImpl();
    }
}
